package com.example.martian.mapper;

import com.example.martian.pojo.YzcmObtain;
import com.example.martian.pojo.YzcmRedpacket;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface RedPacketMapper {

    //查询币种
    List<Map<String,Object>> checkExchange();

    //<!--  根据币种查询汇率  -->
    String selectExchangeRateByCoins(String coins);

    //<!-- 查询用户币种余额 -->
    List<Map<String,Object>> selectCoinMoneyByAddress(@Param("address")String address,@Param("coins") String coin);

    //<!--添加发红包记录-->
    int insertRedPacket(YzcmRedpacket yzcmRedpacket);

    //<!--查看收红包记录-->
    List<Map<String,Object>> selectRedPacketRoll(@Param("address") String address);

    //查看发红包记录
    List<Map<String,Object>> selectRedPacket(@Param("address") String address);

    //<!--添加收红包记录-->
    int insertRedPacketRoll(YzcmObtain yzcmObtain);

    Integer selectJYpassword(@Param("address") String address);

    //查询验证码
    String selectcInvitationcode(@Param("address") String address);

    //收到红包修改金额
    void  updateCoinMoney(String address,String coin,String coinMoney);

    //更新剩余红包个数
    void updateRemainNumber(Integer remainNumber,String address,String cipher);

    //红包过期后更新状态
    void updateRedPacketZt(Integer zt,String address,String cipher);
}
